Block Device Encryption |
Stacked Filesystem Encryption |
Simple in concept and implementation; just transform blocks as
they pass through. |
High level of design complexity; meticulous handling of internal
filesystem primitives required. |
Must allocate a block device to dedicate for the entire
filesystem. |
Stacks on top of existing mounted filesystems; requires no special
on-disk storage allocation effort. |
Everything in the filesystem incurs the cost of encryption and
decryption, regardless of the confidentiality requirements for the
data. |
Selective encryption of the contents of only the sensitive
files. |
Fully protects the confidentiality of the directory structures,
superblocks, file sizes, file permissions, and so forth. |
Cannot keep all filesystem metadata confidential. Since stacked
filesystems encrypt on a per-file basis, attackers will know the
approximate file sizes, for instance. |
Coarse granularity; only fixed per-mountpoint encryption policies
are possible. |
Fine granularity; flexible per-file encryption policies are
possible. |
No notion of ``encrypted files.'' Individual files must be
re-encrypted via a userspace application before written to backups,
sent via email, etc. |
Individual encrypted files can be accessed transparently by
applications; no additional work needed on the part of applications
before moving the files to another location. |
Clients cannot use directly on networked filesystems; encryption
must be set up and managed on the server, or the client must encase
all of his files in a loopback mount, losing the per-file granularity
from the perspective of other clients. |
Clients can stack on locally mounted networked filesystems;
individual files are sent to the server and stored in encrypted
form. |
Can protect databases that use their own dedicated block device. |
Can only protect databases that write their tables to regular
files in an existing filesystem. |
Used to protect swap space. |
Not designed to protect swap space; we recommend using block
device encryption to protect swap space while using eCryptfs on the
filesystem. |
Possible to hide the fact that the partition is encrypted. |
The fact that encrypted data exists on the device is obvious to an
observer. |
Filesystem-agnostic; any filesystem will work on an encrypted
block device. |
Can only be expected to work with existing filesystems that are
upstream in the official Linux kernel. |